<?php /* Smarty version Smarty-3.1.18, created on 2017-05-17 16:06:54
         compiled from "/data/www/mystery/protected/modules/webadmin/views/network/add.tpl" */ ?>
<?php /*%%SmartyHeaderCode:117623985854c4c5e3907081-90386919%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '26f6987c70f7cf1a37768b820166001bad8133e6' => 
    array (
      0 => '/data/www/mystery/protected/modules/webadmin/views/network/add.tpl',
      1 => 1494904921,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '117623985854c4c5e3907081-90386919',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.18',
  'unifunc' => 'content_54c4c5e39acad3_53742091',
  'variables' => 
  array (
    'info' => 0,
    'banklist' => 0,
    'key' => 0,
    'bank_id' => 0,
    'val' => 0,
    'alllevel' => 0,
    'next_level' => 0,
    'up_network_id' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_54c4c5e39acad3_53742091')) {function content_54c4c5e39acad3_53742091($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ("../common/header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<table width="100%" border="0" cellspacing="0">
 <tr>
       <td width="13%" valign="top">
           <?php echo $_smarty_tpl->getSubTemplate ("../common/left.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

       </td>
       <td width="87%" valign="top">

               <table width="100%" border="0" cellspacing="0">
                 <tr>
                       <td>
                        <div class="subnav">
                          <div class="content-menu ib-a blue line-x"> 
                                <a href="/webadmin/network/list"><em>网点信息管理</em></a><span>|</span>
                                <a href="javascript:;" class="on"><em><?php if ($_smarty_tpl->tpl_vars['info']->value) {?>编辑网点<?php } else { ?>添加网点<?php }?></em></a>
                           <div class="clearbox"></div>
                          </div>
                        </div>
                           
                            <div class="pad_10">
                              <div class="table-list">
                                    <div class="common-form">
                                        <form name="myform" action="<?php if ($_smarty_tpl->tpl_vars['info']->value) {?>/webadmin/network/doEdit<?php } else { ?>/webadmin/network/doAdd<?php }?>" method="post" id="myform">
                                        <table width="100%" class="table_form contentWrap">
                                        <tbody>
                                        <tr>
                                            <td width="80">网点编号</td> 
                                            <td>
                                                <input type="text" name="network_num" value="<?php echo $_smarty_tpl->tpl_vars['info']->value['network_num'];?>
" class="input-text" id="network_num">
                                                <input type="hidden" name="checknetwork" value="0" id="checknetwork" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td width="80">网点名称</td> 
                                            <td><input type="text" name="network_name" value="<?php echo $_smarty_tpl->tpl_vars['info']->value['network_name'];?>
" class="input-text" id="network_name"></td>
                                        </tr>
                                        <tr>
 
                                        <tr>
                                        <td>网点所属银行</td> 
                                        <td>
                                            <select name="bank_id"  class="w158">
                                                <?php  $_smarty_tpl->tpl_vars['val'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['val']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['banklist']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['val']->key => $_smarty_tpl->tpl_vars['val']->value) {
$_smarty_tpl->tpl_vars['val']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['val']->key;
?>
                                                <option value="<?php echo $_smarty_tpl->tpl_vars['key']->value;?>
" <?php if ($_smarty_tpl->tpl_vars['info']->value['bank_id']==$_smarty_tpl->tpl_vars['key']->value||$_smarty_tpl->tpl_vars['bank_id']->value==$_smarty_tpl->tpl_vars['key']->value) {?>selected="selected"<?php }?>><?php echo $_smarty_tpl->tpl_vars['val']->value;?>
</option>
                                                 <?php } ?>
                                          </select>
                                        </td>
                                        </tr>
                                        <tr>
                                            <td width="80">登录昵称</td> 
                                            <td><input type="text" name="network_username" value="<?php echo $_smarty_tpl->tpl_vars['info']->value['network_username'];?>
" class="input-text" id="network_username"></td>
                                        </tr>
                                        <tr>
                                            <td width="80">登录密码</td> 
                                            <td>
                                                <input type="text" name="network_pwd" value="<?php echo $_smarty_tpl->tpl_vars['info']->value['network_pwd'];?>
" class="input-text" id="network_pwd">
                                            </td>
                                        </tr>
                                        <tr>
                                            <td width="80">网点级别</td>
                                            <td>
                                                <select name="level">
                                                    <?php  $_smarty_tpl->tpl_vars['val'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['val']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['alllevel']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['val']->key => $_smarty_tpl->tpl_vars['val']->value) {
$_smarty_tpl->tpl_vars['val']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['val']->key;
?>
                                                        <option <?php if ($_smarty_tpl->tpl_vars['info']->value['level']==$_smarty_tpl->tpl_vars['key']->value||$_smarty_tpl->tpl_vars['next_level']->value==$_smarty_tpl->tpl_vars['key']->value) {?>selected="selected"<?php }?> value="<?php echo $_smarty_tpl->tpl_vars['key']->value;?>
"><?php echo $_smarty_tpl->tpl_vars['val']->value['desc'];?>
</option>
                                                    <?php } ?>
                                                </select>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td width="80">网点权限级别</td>
                                            <td>
                                                <select name="auth_grade">
                                                    <?php  $_smarty_tpl->tpl_vars['val'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['val']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['alllevel']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['val']->key => $_smarty_tpl->tpl_vars['val']->value) {
$_smarty_tpl->tpl_vars['val']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['val']->key;
?>
                                                        <option <?php if ($_smarty_tpl->tpl_vars['info']->value['auth_grade']==$_smarty_tpl->tpl_vars['key']->value||$_smarty_tpl->tpl_vars['next_level']->value==$_smarty_tpl->tpl_vars['key']->value) {?>selected="selected"<?php }?> value="<?php echo $_smarty_tpl->tpl_vars['key']->value;?>
"><?php echo $_smarty_tpl->tpl_vars['val']->value['desc'];?>
</option>
                                                    <?php } ?>
                                                </select>
                                            </td>
                                        </tr>
                                        </tbody>
                                        </table>
	
                                        <div class="bk15"></div>
                                        <input name="up_network_id" type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['up_network_id']->value;?>
"/>
                                        <?php if ($_smarty_tpl->tpl_vars['info']->value) {?><input type="hidden" name="network_id" value="<?php echo $_smarty_tpl->tpl_vars['info']->value['network_id'];?>
"/><?php }?>
                                        <input name="dosubmit" type="submit" value="提交" class="button">
                                        </form>
                                        </div>
                              </div>
                            </div>

                       </td>
                 </tr>
               </table>
       </td>
 </tr>
</table>
<script type="text/javascript">
$(document).ready(function() {     
    var options = {         
        beforeSubmit:  showRequest,  
        success:       showResponse,
        dataType:  'json'
    }
    $('#myForm1').ajaxForm(options); 
    //判断编码是否唯一
    /*$('#network_num').blur(function(){
        var network_num = $(this).val();
        if (network_num) {
            $.getJSON('/webadmin/network/checknetwork',{network_num:network_num},function(res){
                if (res.status==0) {
                    alert(res.note);
                } else {
                    $('#checknetwork').val(1);
                }
            });
        }
    });*/
});
function showRequest(formData, jqForm, options) { 
    var checknetwork = $('#checknetwork').val();
    if (checknetwork ==0) {
        alert('请检查编号是否唯一');
        return false;
    }
    return true;
}
function showResponse(responseText, statusText, xhr, $form)  { 
    alert(responseText.note);
}

</script>
<?php echo $_smarty_tpl->getSubTemplate ("../common/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
<?php }} ?>
